package com.xinzhi.controller;

import com.xinzhi.pojo.dto.KouFenShenHe;
import com.xinzhi.service.AppraisalService;
import com.xinzhi.service.KouFenShenHeService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class KouFenShenHeController {
    @Autowired
    private KouFenShenHeService kouFenShenHeService;

    /**
     * 特殊扣分审核查询接口
     * @return
     */
    @GetMapping("/selectKou")
    public List<KouFenShenHe> selectKou(){
       return kouFenShenHeService.selectAllssss();
    }

    /**
     * 特殊扣分审核根据状态查询接口
     */

    @GetMapping("/selectKouByPublishstatus")
    public Result selectKouByPublishstatus(String publishstatus){
        return kouFenShenHeService.selectKouByPublishstatus(publishstatus);
    }
    //特殊扣分审核根据状态查询接口
    @GetMapping("/selectKouBypublish")
    public Result selectKouBypublish(String publishstatus){
        return kouFenShenHeService.selectKouByPublish(publishstatus);
    }



    /**
     * 特殊扣分审核根据年份查询接口i
     */

    @GetMapping("/selectKouByYearnumber")
    public Result selectKouByYearnumber(String yearnumber){
        return kouFenShenHeService.selectKouByYearnumber(yearnumber);
    }



    /**
     * 特殊扣分审核删除接口
     */
    @PostMapping("/updatedemerit")
    public Result updatedemerit(String demerit,Integer deleted){
        return kouFenShenHeService.deleteupdate(demerit,deleted);
    }
}
